package com.scalar.chiptrack.operations.process;

import java.util.ArrayList;

import org.apache.struts.upload.FormFile;


/**
 * Form bean for the Sort_Process page.  This form has the following fields,
 * with default values in square brackets:
 * <ul>
 * <li><b>action</b> - The maintenance action we are performing (Create & Modify).
 * </ul>
 *
 * @author Kesava Kumar Achanala
 * @version $Revision: 1.1.1.1 $ $Date: 2006/12/11 23:43:08 $
 */




public class SortProcess  {


    // --------------------------------------------------- Instance Variables
        private int processStepId = -1;
        private String processType = null;
		private int baseProductId = -1;
		private int previousStepId = -1;
		private int noOfSortsTodo = -1;
		private String sortProductName = null;
		private float expectedNetDiePerWafer;
		private float lotHoldYieldLimit;
		private float lotScrapYieldLimit;
		private float stndUnitCost;
		private String poFrequency = null;
		private String procedureDocNo = null;
		private String programDocNo = null;
        private int procedureDocId = -1;
        private int programDocId = -1;
        private FormFile procedureDocFile = null;
        private FormFile programDocFile = null;
	  	private String probeCardNo = null;
		private String system = null;
		private String rmaCriteria = null;
		private String scrapCriteria = null;
		private String comments = null;
		private ArrayList vendorLocations = null;
        private ArrayList transportLocations = null;
        private boolean updated;
        private ArrayList sortBins = null;
		private int trackId;
		private String [] dupProductName = new String[0];
        
        	
    // ----------------------------------------------------------- Properties
    
     /**
      * Get the ProcessStep Id
      * 
      * @return processStepId
      */
      public int getProcessStepId()
      {
          return processStepId;
      }
      
      /**
       * Set the ProcessStep Id
       * 
       *@param processStepId
       */
      public void setProcessStepId(int processStepId)
      {
          this.processStepId = processStepId;
      }
      
      
     /**
      * Get the Base Product Id
      *
      * @return baseProductId
      */
     public int getBaseProductId() {
           return baseProductId;
     }


     /**
      * Set the Base Product Id
      *
      * @param baseProductId
      */
     public void setBaseProductId(int baseProductId) {
	 	this.baseProductId = baseProductId;
     }

     /**
      * Get the Process Type
      * 
      * @return @processType
      */
     public String getProcessType()
     {
         return processType;
     }
     
     /**
      * Set the Process Type
      *
      * @param processType
      */
     public void setProcessType(String processType)
     {
         this.processType = processType;
     }
     
     /**
      * Get the Previous Step Id
      *
      * @return previousStepId
      */
     public int getPreviousStepId() {
           return previousStepId;
     }


     /**
      * Set the Previous Step Id
      *
      * @param previousStepId
      */
     public void setPreviousStepId(int previousStepId) {
	 	this.previousStepId = previousStepId;
     }

     /**
      * Get the NoSortsTodo
      *
      * @return noOfSorts
      */
     public int getNoOfSortsTodo() {
           return noOfSortsTodo;
     }


     /**
      * Set the No Of Sorts Todo
      *
      * @param noOfSortsTodo
      */
     public void setNoOfSortsTodo(int noOfSortsTodo) {
	 	this.noOfSortsTodo = noOfSortsTodo;
     }

    /**
     * Get the Sort Product Name
     *
     * @return sortProductName
     */
     public String getSortProductName() { 
           return sortProductName;
     }


     /**
      * Set the Sort Product Name
      *
      * @param sortProductName
      */
     public void setSortProductName(String sortProductName) {
	 	this.sortProductName = sortProductName;
     }

    /**
     * Get Expected Net Die/Wafer
     * @return expNetDiePerWafer
     */
     public float getExpectedNetDiePerWafer() {
           return expectedNetDiePerWafer;
     }


     /**
      * Set the Expected Net Die/Wafer
      *
      * @param expectedNetDiePerWafer
      */
     public void setExpectedNetDiePerWafer(float expectedNetDiePerWafer) {
	 	this.expectedNetDiePerWafer = expectedNetDiePerWafer;
     }

    /**
     * Get Lot Hold Yield Limit
     * @return lotHoldYieldLimit
     */
     public float getLotHoldYieldLimit() {
           return lotHoldYieldLimit;
     }


     /**
      * Set the Lot Hold Yield Limit
      *
      * @param lotHoldYieldLimit
      */
     public void setLotHoldYieldLimit(float lotHoldYieldLimit) {
	 	this.lotHoldYieldLimit = lotHoldYieldLimit;
     }

    /**
     * Get the Lot Scrap Yield Limti
     *
     * @return lotScrapYieldLimit
     */
     public float getLotScrapYieldLimit() {
           return lotScrapYieldLimit;
     }


     /**
      * Set the Lot ScrapYieldLimit
      *
      * @param lotScrapYieldLimit
      */
     public void setLotScrapYieldLimit(float lotScrapYieldLimit) {
	 	this.lotScrapYieldLimit = lotScrapYieldLimit;
     }

    /**
     * Get the Standart Unit Cost
     *
     * @return stndUnitCost
     */
     public float getStndUnitCost() {
           return stndUnitCost;
     }


     /**
      * Set the Standard Unit Cost
      *
      * @param stndUnitCost
      */
     public void setStndUnitCost(float stndUnitCost) {
	 	this.stndUnitCost = stndUnitCost;
     }

    /**
     * Get the PO Frequency
     *
     * @return poFrequency
     */
     public String getPoFrequency() {
           return poFrequency;
     }


     /**
      * Set the PO Frequency
      *
      * @param poFrequency
      */
     public void setPoFrequency(String poFrequency) {
	 	 this.poFrequency = poFrequency;
     }

    /**
     * Get the Procedure Doc No
     *
     * @return procedureDocNo
     */
     public String getProcedureDocNo() {
           return procedureDocNo;
     }


     /**
      * Set the Procedure Doc No
      *
      * @param procedureDocNo
      */
     public void setProcedureDocNo(String procedureDocNo) {
	 	 this.procedureDocNo = procedureDocNo;
     }

    /**
     * Get the Program Doc No
     *
     * @return programDocNo
     */
     public String getProgramDocNo() {
           return programDocNo;
     }


     /**
      * Set the Program Doc No
      *
      * @param programDocNo
      */
     public void setProgramDocNo(String programDocNo) {
	 	 this.programDocNo = programDocNo;
     }

    /**
     * Get the Probe Card No
     *
     * @return probeCardNo
     */
     public String getProbeCardNo() {
           return probeCardNo;
     }


     /**
      * Set the Probe Card No
      *
      * @param probeCardNo
      */
     public void setProbeCardNo(String probeCardNo) {
	 	 this.probeCardNo = probeCardNo;
     }

    /**
     * Get the System
     *
     * @return system
     */
     public String getSystem() {
           return system;
     }


     /**
      * Set the System
      *
      * @param system
      */
     public void setSystem(String system) {
	 	 this.system = system;
     }

    /**
     * Get the RMA Criteria
     *
     * @return rmaCriteria
     */
     public String getRmaCriteria() {
           return rmaCriteria;
     }


     /**
      * Set the RMA Criteria
      *
      * @param rmaCriteria
      */
     public void setRmaCriteria(String rmaCriteria) {
	 	 this.rmaCriteria = rmaCriteria;
     }

    /**
     * Get Scrap Criteria
     *
     * @return scrapCriteria
     */
     public String getScrapCriteria() {
           return scrapCriteria;
     }


     /**
      * Set the Scrap Criteria
      *
      * @param scrapCriteria
      */
     public void setScrapCriteria(String scrapCriteria) {
	 	 this.scrapCriteria = scrapCriteria;
     }


    /**
     * Get the Comments
     *
     * @return comments
     */
     public String getComments() {
           return comments;
     }


     /**
      * Set the Comments
      *
      * @param comments
      */
     public void setComments(String comments) {
	 	 this.comments = comments;
     }


    /**
     * Get the Sort Locations
     *
     * @return sortLocations
     */
     public ArrayList getVendorLocations() {
           return vendorLocations;
     }


     /**
      * Set the Sort Locations
      *
      * @param sortLocations
      */
     public void setVendorLocations(ArrayList vendorLocations) {
	 	 this.vendorLocations = vendorLocations;
     }

    
     /**
      * Get the Transposrt locations
      * 
      * @return transportLocations
      */
     public ArrayList getTransportLocations()
     {
         return transportLocations;
     }
     
     /**
      * Set the Transport Locations
      *
      * @param transportLocaitons
      */
     public void setTransportLocations(ArrayList transportLocations)
     {
         this.transportLocations = transportLocations;
     }


     /**
      * Get the ProgramDoc File
      *
      * @return programDocFile
      */
     public FormFile getProgramDocFile()
     {
         return programDocFile;
     }
     
     /**
      *  Set the Program Doc File
      *
      * @param programDocFile
      */
     public void setProgramDocFile(FormFile programDocFile)
     {
         this.programDocFile = programDocFile;
     }

    /**
      * Get the ProcedureDoc File
      *
      * @return procedureDocFile
      */
     public FormFile getProcedureDocFile()
     {
         return procedureDocFile;
     }
     
     /**
      *  Set the Procedure Doc File
      *
      * @param procedureDocFile
      */
     public void setProcedureDocFile(FormFile procedureDocFile)
     {
         this.procedureDocFile = procedureDocFile;
     }     

     public int getProgramDocId()
     {
         return programDocId;
     }
     
     public void setProgramDocId(int programDocId)
     {
         this.programDocId = programDocId;
     }
     
     public int getProcedureDocId()
     {
         return procedureDocId;
     }
     
     public void setProcedureDocId(int procedureDocId)
     {
         this.procedureDocId = procedureDocId;
     }
     
     public ArrayList getSortBins()
     {
         return sortBins;
     }
     
     public void setSortBins(ArrayList sortBins)
     {
         this.sortBins = sortBins;
     }
     
     public void setAddSortBins(String empty)
     {
        int noOfBins = sortBins.size();
               
        for(int i=0; i<5; i++) {
            noOfBins++;
            SortBins bins = new SortBins("Bin"+noOfBins,"","");
            sortBins.add(bins);
        
        }
     }
     
     /**
	  * NEW communications methods that are here to keep the child classes
	  * up to speed with the state of actions, being set etc.
	  *
	  * This particular method is to tell the object hierarchy that the updating
	  * by the servlet is complete, and it can go ahead and commit any deletions
	  * to lists that may have occured.
	  *
	  *
	  * @param isUpdated boolean property to tell the bean as to the update status
	  */
	 public void updateComplete(boolean isUpdated)
	 {
	     this.updated = isUpdated;
	 }
	
	 /**
	  * Method that will return true of the action class has been run, and child
	  * object can go ahead and commit their deletions to lists.
	  *
	  * @return true if the servlet has finished setting properties and the action
	  *         has been run.
	  */
	 public boolean isUpdated()
	 {
	    return this.updated;
	 }
	 
	 
	 public int getTrackId()
	 {
	     return trackId;
	 }
	 
	 public void setTrackId(int trackId)
	 {
	     this.trackId = trackId;
	 }
	 
	 
    /**
     * @return
     */
    public String[] getDupProductName()
    {
        return dupProductName;
    }

    /**
     * @param strings
     */
    public void setDupProductName(String[] strings)
    {
        dupProductName = strings;
    }

}
